<template>
  <div class="m_pr post_item" @click="onClick()">
    <van-image width="100%" height="100%" fit="cover" :src="ip+item.coverUrl"/>
    <div class="m_pa m_fs15 info">
      <div v-if="item.status==2">待审核</div>
      <div v-else-if="item.status==1">
        内容违规
      </div>
      <van-icon v-else-if="item.status==0" name="like-o" class="">
        <span class="m_fs12"> {{item.likeCount}}</span>
      </van-icon>
    </div>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  props: {
    item: {type:Object, required:true}
  },
  computed: {
    ...mapState(['ip'])
  },
  methods:{
    onClick(){
      this.$emit('click')
    }
  }
}
</script>

<style lang="scss" scoped>
.post_item{
  width: 33.33%;
  padding: .5px;
  height: 160px;
  box-sizing: border-box;
  .info{
    color: #fff;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
}
</style>